package me.idashu.attg.service;

import java.util.List;

import me.idashu.attg.domain.AreaEntity;
import me.idashu.attg.persistence.AreaMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AreaService {
    @Autowired
    private AreaMapper areaMapper;
    
    public List<AreaEntity> getAllAreaEntity(){
    	List<AreaEntity> listArea = areaMapper.getAllAreaEntity();
    	return listArea;
    }
    public AreaEntity getAreaEntityInfo(String areaCode){
    	AreaEntity area = areaMapper.getAreaInfo(areaCode);
    	return area;
    }
    
    public void insertArea(AreaEntity areaEntity){
    	areaMapper.insertArea(areaEntity);
    }
}
